<?php
class crudPHP{
    private $crud;
    private $campos;
    private $nomeColunas;
    private $tabela;
    private $prefixo;
    private $sql;


    function __construct(){
        include 'crud.php';
        $this->crud = new crud();
    }

    function cria(){
        
        $this->cabecalho();
        //$this->crud->sqll($this->sql);
        $this->crud->listar($this->tabela, $this->campos , $this->nomeColunas, $this->prefixo, $this->sql);
        $this->rodape();
        //echo "$this->sql";
    }
    
    function campos($campo="", $nomeColuna="", $prefx=''){
        $this->campos = $campo;
        $this->nomeColunas = $nomeColuna;
        $this->prefixo = $prefx;
    }
        
    
    function tabela($tabela){
        $this->tabela = $tabela;
        
    }
    function codigoSql($SQl){
        $this->sql = $SQl;
    }


    function cabecalho(){
         include 'cabecalhoTab.php';
            
        }
        
        function rodape(){
            include 'rodapeTab.php';
        }
    
}

